package images_api

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"gvb_server/models"
	"gvb_server/models/res"
	"gvb_server/service/common"
)

// ImageList 查看图片列表
func (ImagesApi) ImageList(c *gin.Context) {
	var page models.Page
	err := c.ShouldBindQuery(&page)
	if err != nil {
		res.FailCode(res.ArgumentError, c)
	}
	n1 := &models.NewBannerModel
	n2 := &models.NewBannerModel
	fmt.Printf("n1: %p, n2: %p", n1, n2)
	list, count := common.Page(models.NewBannerModel, page)
	res.OKWithPage(list, count, c)
}
